class CreateProductPropertyAttributes < ActiveRecord::Migration
  def change
    create_table :product_property_attributes, :force => true do |t|
      t.references :property
      t.string :presentation, :null => true, :limit => 35
      t.string :value_type, :null => true, :limit => 10, :default => 'value'

      t.integer :parent_id,   :limit => 4
      t.integer :lft,  :limit => 11, :null => false
      t.integer :rgt, :limit => 11, :null => false
    end

    add_index :product_property_attributes, :property_id
  end
end
